package jam.network.message;

import jam.network.NetworkController;
import java.util.Scanner;
import java.lang.String;

public class ResponsePassword extends ServerResponse {

	public static void process(String msg) {
		Scanner s = new Scanner( msg );
		s.useDelimiter(":");

		//skip keyword
		s.next();
	 
		//get transID
		int id = s.nextInt();
	
		//clean up hashmap
		NetworkController.sent.remove(id);

		String result = s.next();

		if ( result.equalsIgnoreCase("TRUE") )
					  System.out.println("password changed successfully");
		else
			System.out.println("password change failed");
	}

}